Skip to content

feat: add CourseModePriceRequested filter#376

Open
kiram15 wants to merge 1 commit into
openedx:mainfrom
kiram15:kiram15/ENT-11573
Open

feat: add CourseModePriceRequested filter#376
kiram15 wants to merge 1 commit into
openedx:mainfrom
kiram15:kiram15/ENT-11573

Conversation

@kiram15

@kiram15 kiram15 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

This new filter determines the price a learner should be charged based upon their course mode. It has two related PRs that show the full implementation and how it is tested (see below).

This ticket is split from #338, please reference for previous PR comments.

Supporting information

https://2u-internal.atlassian.net/browse/ENT-11573
edx/edx-platform#365
openedx/edx-enterprise#2556

Testing instructions

Testing instruction in the edx-enterprise PR!

Checklists

Check off if complete or not applicable:

Merge Checklist:

  • All reviewers approved
  • Reviewer tested the code following the testing instructions
  • CI build is green
  • Changelog entry added using scriv with short description of the change
  • Documentation updated (not only docstrings)
  • Code dependencies reviewed
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

Post Merge:

  • Trigger the release workflow to create a new GitHub release.
  • Check new version is pushed to PyPI after tag-triggered build is finished.
  • Delete working branch (if not needed anymore)
  • Upgrade the package in the Open edX platform requirements (if applicable)


Arguments:
block (VerticalBlock): The VeriticalBlock instance which is being rendered.
block (VerticalBlock): The VerticalBlock instance which is being rendered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated spelling change

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new public filter to the openedx_filters.learning subdomain for determining the price a learner should be charged for a selected course mode, along with a basic passthrough test to validate default behavior when no pipeline is configured.

Changes:

  • Added CourseModePriceRequested filter (org.openedx.learning.course_mode.price.requested.v1) with a run_filter(user, course_mode_data, price) API.
  • Added a unit test verifying the filter returns the original inputs when no pipeline is configured.
  • Fixed minor typos in an existing VerticalBlock-related docstring.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
openedx_filters/learning/filters.py Introduces the new CourseModePriceRequested filter and corrects a docstring typo elsewhere in the module.
openedx_filters/learning/tests/test_filters.py Adds a new test case covering the default passthrough behavior for the new filter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread openedx_filters/learning/filters.py Outdated
Comment thread openedx_filters/learning/filters.py Outdated
Comment thread openedx_filters/learning/filters.py Outdated
Comment thread openedx_filters/learning/tests/test_filters.py Outdated
Comment thread openedx_filters/learning/tests/test_filters.py Outdated

@pwnage101 pwnage101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides the minor assertion issue, this also still needs a version bump & changelog entry

Comment thread openedx_filters/learning/tests/test_filters.py Outdated
Comment thread openedx_filters/learning/filters.py Outdated
@kiram15 kiram15 force-pushed the kiram15/ENT-11573 branch from 4049968 to 025a230 Compare July 10, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants